package com.liannong.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_order")
public class Order {
    @TableId(type = IdType.AUTO)
    private Integer id;

    @TableField("user_id")
    private Integer userId;
    
    @TableField("product_id")
    private Integer productId;
    
    @TableField("trace_code")
    private String traceCode;
    
    @TableField("quantity")
    private Integer quantity;
    
    @TableField("total_price")
    private BigDecimal totalPrice;
    
    @TableField("status")
    private Integer status; // 0-待处理 1-已发货 2-配送中 3-已完成 4-已取消
    
    @TableField("create_time")
    private LocalDateTime createTime;
    
    @TableField("delivery_address")
    private String deliveryAddress;
} 